﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TireService.Data;

namespace TireService.Website.Booking
{
    public partial class Oversigt : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            TireServiceDB db = new TireServiceDB();

            gvBookings.DataSource = db.tmpBookings.ToList();
            gvBookings.DataBind();
        }

        protected void btnShow_Click(object sender, EventArgs e)
        {
            if (txtPassword.Text == "Mobil")
            {
                gvBookings.Visible = true;
            }
        }

        protected void btnExport_Click(object sender, EventArgs e)
        {
            gvBookingExport.WriteXlsToResponse();
        }
    }
}